<%@page import="org.jeecgframework.web.util.StaticValue"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
	<div region="center" style="padding:1px;">
		<t:datagrid name="zyEquipmentSpareList" fitColumns="false" title="设备信息查询" actionUrl="zyEquipmentSpareController.do?datagridOfEsInfoList" 
			idField="id" fit="true" queryMode="group" autoLoadData="false">
			<t:dgCol title="主键"			field="id"		hidden="true"		width="120"></t:dgCol>
			<t:dgCol title="设备SN"			field="sn"							queryMode="single"	query="true"	width="120"/>
			<t:dgCol title="机型"			field="type.typeDesc"				width="120"/>
			<t:dgCol title="Item"			field="item"				        queryMode="single"	query="true" width="100"/>
			<t:dgCol title="BP"				field="bpNo"						queryMode="single"	query="true"	width="100"/>
			<t:dgCol title="省市"			field="tsTerritoryVal"				width="120"	sortable="false" />
			<t:dgCol title="省市"			field="tsTerritory.territoryName"	hidden="true" queryMode="single"	sortable="false"	query="true"	width="80"	/>
			<t:dgCol title="所在影院名称"		field="zyCinema.name"  				queryMode="single"	query="true"	width="250"	/>
			<t:dgCol title="发货日期"		field="sendDate"    				width="90"		formatter="yyyy-MM-dd" />
			<t:dgCol title="安装日期"		field="installDate"					width="90"		formatter="yyyy-MM-dd" />
			<t:dgCol title="销售保期"			field="repairDate"				width="80"		/>
			<t:dgCol title="保修截止日期"		field="repairEndDate"				width="100"		formatter="yyyy-MM-dd" />
			<t:dgCol title="是否异常"		field="isNormal"					width="80"		dictionary="<%=StaticValue.DIC_TRUE_OR_FALSE_NUM %>" />
			<t:dgCol title="设备服务状态"		field="serverState"					width="100"		dictionary="<%=StaticValue.DIC_SERVER_STATE %>" />
			<t:dgCol title="激光改造"		field="laserReconstruction"			width="70"		dictionary="<%=StaticValue.DIC_TRUE_OR_FALSE_NUM %>" defaultSelectVal="<%=StaticValue.DIC_TRUE_OR_FALSE_NUM_0 %>"/>

			<t:dgToolBar title="查看" operationCode="esInfoView" icon="icon-search" url="zyEquipmentSpareController.do?goView" funname="view" width="850" height="400"></t:dgToolBar>
		</t:datagrid>
	</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
	territoryLink("zyEquipmentSpareList","tsTerritory.territoryName");
	chooseBpForQueryParam("bpNo");
});
/**
 * 查看设备详细
 */
function view(){
	var datas = $("#zyEquipmentSpareList").datagrid("getSelections");
	if(datas.length != 1){
		tip("请选择一条查看的设备");
		return;
	}
	var id = datas[0].id;
	addOneTab("查看设备详细","zyEquipmentSpareController.do?goView&id="+id,"");
}
</script>